//
//  TravelTableViewCell.m
//  BeanTrip
//
//  Created by dlios on 15-7-8.
//  Copyright (c) 2015年 PandaGroup. All rights reserved.
//

#import "TravelTableViewCell.h"
#define WIDTH self.contentView.frame.size.width/375
#define HEIGHT self.contentView.frame.size.height/140
@implementation TravelTableViewCell
- (void)dealloc
{
    [_travelImageView release];
    [_travelLabel release];
    [_travelLabel2 release];
    [_travelLabel3 release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.travelImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.travelImageView];
        self.travelImageView.backgroundColor=[UIColor whiteColor];
        self.travelImageView.layer.masksToBounds=YES;
        self.travelImageView.layer.borderWidth=1;
        self.travelImageView.layer.cornerRadius=8;
        [_travelImageView release];
       
        self.travelLabel = [[UILabel alloc] init];
        self.travelLabel.numberOfLines = 0;
        self.travelLabel.textColor=[UIColor whiteColor];
        self.travelLabel.font = [UIFont systemFontOfSize:17];
        [self.contentView addSubview:self.travelLabel];
        [_travelLabel release];
        
        self.travelLabel2=[[UILabel alloc] init];
        [self.contentView addSubview:self.travelLabel2];
        self.travelLabel2.textColor=[UIColor whiteColor];
        self.travelLabel2.font = [UIFont systemFontOfSize:14];
        [_travelLabel2 release];
        
        self.travelLabel3=[[UILabel alloc] init];
        [self.contentView addSubview:self.travelLabel3];
        self.travelLabel3.textColor=[UIColor whiteColor];
        self.travelLabel3.font = [UIFont systemFontOfSize:14];
        [_travelLabel3 release];

    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.travelImageView.frame = CGRectMake(10*WIDTH, 0, (375*WIDTH)-(20*WIDTH), 140*HEIGHT);
    
    self.travelLabel.frame = CGRectMake(20*WIDTH, 10*HEIGHT, (375*WIDTH)-(20*WIDTH), 60*HEIGHT);
    self.travelLabel2.frame = CGRectMake(20*WIDTH, 80*HEIGHT, (375*WIDTH)-(20*WIDTH) , 30*HEIGHT);
    self.travelLabel3.frame = CGRectMake(20*WIDTH, 100*HEIGHT, (375*WIDTH)-(20*WIDTH), 30*HEIGHT);
    
    
    
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
